package com.blandware.atleap.webapp.form.questionnaire;

import javax.servlet.http.HttpServletRequest;
import com.blandware.atleap.webapp.form.BaseForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.upload.FormFile;
import org.apache.struts.upload.MultipartRequestHandler;
import java.util.Map;
import java.util.HashMap;

/**
 * @struts.form name="answerOptionForm" 
 */
public  class AnswerOptionForm
    extends    BaseForm
    implements java.io.Serializable
{

    protected String id;

    protected String questionId;

    protected Map titleMap;

    protected String version;

    /** Default empty constructor. */
    public AnswerOptionForm() {}

    public String getId()
    {
        return this.id;
    }

   /**
    */
    public void setId(String id)
    {
        this.id = id;
    }

    public String getQuestionId()
    {
        return this.questionId;
    }

   /**
    */
    public void setQuestionId(String questionId)
    {
        this.questionId = questionId;
    }

    public Map getTitleMap()
	{
		return this.titleMap;
	}
    public Object getTitle(String key)
	{
		return this.titleMap != null ? this.titleMap.get(key) : null;
	}

   /**
    */
    public void setTitleMap(Map titleMap)
	{
		this.titleMap = titleMap;
	}
    public void setTitle(String key, Object value)
	{
		if ( this.titleMap == null ) {
			this.titleMap = new HashMap();
		}
		this.titleMap.put(key, value);
	}

    public String getVersion()
    {
        return this.version;
    }

   /**
    */
    public void setVersion(String version)
    {
        this.version = version;
    }

    /**
     * @see org.apache.struts.action.ActionForm#reset(org.apache.struts.action.ActionMapping,
     *                                                javax.servlet.http.HttpServletRequest)
     */
    public void reset(ActionMapping mapping, HttpServletRequest request) {
        // reset any boolean data types to false

        // reset all linking properties to null

        this.questionId = null;

// reset all mapped properties to default values

		this.titleMap = new HashMap();

    }

}
